﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace PushNotificationsHelper.WindowsApp
{
    public class TileXmlTemplateFactory
    {

        public static XDocument GetXDocumentForTileTemplate(TileTemplate template)
        {
            return XDocument.Parse(GetXMLForTileTemplate(template));
        }

        public static string GetXMLForTileTemplate(TileTemplate template)
        {
            string xmlTemplate = string.Empty;
            switch (template)
            {
                case TileTemplate.TileSquare150x150Block:
                    xmlTemplate = "<tile><visual version=\"2\"><binding template=\"TileSquare150x150Block\" fallback=\"TileSquareBlock\"><text id=\"1\">Text Field 1 (block text)</text><text id=\"2\">Text Field 2</text></binding></visual></tile>";
                    break;
                case TileTemplate.TileSquare150x150Text01:
                    xmlTemplate = "<tile><visual version=\"2\"><binding template=\"TileSquare150x150Text01\" fallback=\"TileSquareText01\"><text id=\"1\"></text><text id=\"2\"></text><text id=\"3\"></text><text id=\"4\"></text></binding></visual></tile>";
                        break;
            }
            return xmlTemplate;
        }



        
    }
}
